/* for win32 port */                                                                                                  
                                                                                                                      
#ifndef SETITIMER_H                                                                                                   
#define SETITIMER_H                                                                                                   
                                                                                                                                                                                                                                 
#ifndef HAVE_SETITIMER                                                                                                
                                                                                                                      
#ifdef __cplusplus                                                                                                    
extern "C" {                                                                                                          
#endif                                                                                                                
 
#ifdef WIN32
#include <winsock2.h> 
#endif                                                                                             
           
                                                                                                                      
#define ITIMER_REAL 0                                                                                                 
                                                                                                                      
struct itimerval                                                                                                      
{                                                                                                                     
    struct timeval it_interval;                                                                                       
    struct timeval it_value;                                                                                          
};                                                                                                                    
                                                                                                                      
                                                                                                                      
typedef void SigAlrmFunc();                                                                                           
typedef SigAlrmFunc *SigAlrmFuncPtr;                                                                                  
                                                                                                                      
void setsigalrmfunc( SigAlrmFuncPtr inFunc );                                                                         
                                                                                                                      
int setitimer(int which, const struct itimerval * value, struct itimerval * ovalue);                                  
                                                                                                                      
#ifdef __cplusplus                                                                                                    
} /* end extern "C" */                                                                                                
#endif                                                                                                                
                                                                                                                      
                                                                                                                      
#endif /* HAVE_SETITIMER */                                                                                           
                                                                                                                      
#endif /* SETITIMER_H */                                                                                              
